home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / role / Ang261Lib.lha / src / variable.c < prev    next >
C/C++ Source or Header  |  1994-10-22  |  5KB  |  124 lines

  1. /* variable.c: Global variables */
  2.  
  3. #include "constant.h"
  4. #include "config.h"
  5. #include "types.h"
  6.  
  7. const char *copyright[5] = {
  8. "Copyright (c) 1989 James E. Wilson, Robert A. Keoneke",
  9. "",
  10. "This software may be copied and distributed for educational, research, and",
  11. "not for profit purposes provided that this copyright and statement are",
  12. "included in all such copies."};
  13.  
  14. /* a horrible hack: needed because compact_monster() can be called from
  15.    creatures() via summon_monster() and place_monster() */
  16. int hack_monptr = (-1);
  17.  
  18. int weapon_heavy = FALSE;
  19. int pack_heavy = FALSE;
  20. int16 log_index = (-1);        /* Index to log file. (<= 0 means no log) */
  21. vtype died_from;
  22.  
  23. vtype savefile;            /* The savefile to use. */
  24.  
  25. int light_rad = 0, old_rad;                /* light radius spoo */
  26. int16 total_winner = FALSE;
  27. int NO_SAVE=FALSE;
  28. int character_generated = 0;    /* don't save score until char gen finished */
  29. int character_saved = 0;    /* prevents save on kill after save_char() */
  30. int highscore_fd;        /* File descriptor to high score file */
  31. int LOAD=0;
  32. int32u randes_seed;        /* for restarting randes_state */
  33. int32u town_seed;        /* for restarting town_seed */
  34. char *old_state = NULL;         /* state array initialized by time -CWS */
  35. char *dummy_state = NULL;       /* dummy state array -CWS */
  36.  
  37. int16 cur_height,cur_width;    /* Cur dungeon size    */
  38. int16 dun_level = 0;        /* Cur dungeon level   */
  39. int object_level = 0;        /* level for objects to be created -CWS  */
  40. int16 missile_ctr = 0;        /* Counter for missiles */
  41. int msg_flag;            /* Set with first msg  */
  42. vtype old_msg[MAX_SAVE_MSG];    /* Last message          */
  43. int16 last_msg = 0;        /* Where last is held */
  44. int death = FALSE;        /* True if died          */
  45. int find_flag;            /* Used in ANGBAND for .(dir) */
  46. int free_turn_flag;        /* Used in ANGBAND, do not move creatures  */
  47. int command_count;        /* Gives repetition of commands. -CJS- */
  48. int default_dir = FALSE;    /* Use last direction for repeated command */
  49. int32 turn = (-1);        /* Cur turn of game    */
  50. int32 old_turn = (-1);        /* Last feeling message */
  51. int wizard = FALSE;        /* Wizard flag          */
  52. int to_be_wizard = FALSE;    /* used during startup, when -w option used */
  53. int16 panic_save = FALSE;    /* this is true if playing from a panic save */
  54. int16 noscore = FALSE;        /* Don't log the game. -CJS- */
  55. int is_home = FALSE;        /* Are we in our home? */
  56. int in_store_flag = FALSE;    /* Don't redisplay light in stores -DGK */
  57. int monster_is_afraid = 0;      /* redo monster fear messages -CWS */
  58. int coin_type;            /* remember Creeping _xxx_ coin type -CWS */
  59. int opening_chest = 0;          /* don't generate another chest -CWS */
  60.  
  61. struct unique_mon u_list[MAX_CREATURES]; /* Unique check list... -LVB- */ 
  62.  
  63. int rogue_like_commands;    /* set in config.h/main.c */
  64.  
  65. /* options set via the '=' command */
  66. /* note that the values set here will be the default settings */
  67. int find_cut = TRUE;
  68. int find_examine = TRUE;
  69. int find_bound = FALSE;
  70. int find_prself = FALSE;
  71. int prompt_carry_flag = FALSE;
  72. int show_weight_flag = FALSE;
  73. int show_equip_weight_flag = FALSE;
  74. int highlight_seams = FALSE;
  75. int find_ignore_doors = FALSE;
  76. int hitpoint_warn = 1;
  77. int feeling = 0;
  78. int carry_query_flag = TRUE;
  79. int delay_spd = 5;
  80. int plain_descriptions = FALSE;
  81. int no_haggle_flag = FALSE;    /* does the player not want to haggle? -CWS */
  82. int quick_messages = FALSE;     /* quick messages -CWS */
  83. int equippy_chars = FALSE;      /* do equipment characters -CWS */
  84. char doing_inven = FALSE;    /* Track inventory commands. -CJS- */
  85. int screen_change = FALSE;    /* Track screen updates for inven_commands. */
  86. char last_command = ' ';      /* Memory of previous command. */
  87.  
  88. /* these used to be in dungeon.c */
  89. int new_level_flag;        /* Next level when true     */
  90. int teleport_flag;        /* Handle teleport traps  */
  91. int player_light;        /* Player carrying light */
  92. int eof_flag = FALSE;        /* Used to signal EOF/HANGUP condition */
  93. int light_flag = FALSE;        /* Track if temporary light about player.  */
  94.  
  95. int wait_for_more = FALSE;    /* used when ^C hit during -more- prompt */
  96. int closing_flag = FALSE;    /* Used for closing   */
  97.  
  98. /*  Following are calculated from max dungeon sizes        */
  99. int16 max_panel_rows,max_panel_cols;
  100. int panel_row,panel_col;
  101. int panel_row_min,panel_row_max;
  102. int panel_col_min,panel_col_max;
  103. int panel_col_prt,panel_row_prt;
  104.  
  105. #ifdef TARGET
  106. /* Targetting information, this code stolen from Morgul -CFT */
  107. int target_mode = FALSE;
  108. int16u target_col;
  109. int16u target_row;
  110. int16u target_mon;
  111. #endif
  112.  
  113. #ifdef MAC
  114. cave_type (*cave)[MAX_WIDTH];
  115. #else
  116. cave_type cave[MAX_HEIGHT][MAX_WIDTH];
  117. #endif
  118.  
  119. #ifdef MAC
  120. recall_type *c_recall;
  121. #else
  122. recall_type c_recall[MAX_CREATURES];    /* Monster memories */
  123. #endif
  124.